﻿using Painter.Component;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Media;

namespace Painter.Model
{
    class PaintSettings
    {
        static PaintSettings _inst;
        public Cursor mCutCursor = new Cursor(System.Windows.Application.GetResourceStream(new Uri(@"Resource/Cursor/1203.cur", UriKind.Relative)).Stream);
        public Cursor mPenCursor = new Cursor(System.Windows.Application.GetResourceStream(new Uri(@"Resource/Cursor/Edit_32x32.cur", UriKind.Relative)).Stream);
        public Cursor mOilCursor = new Cursor(System.Windows.Application.GetResourceStream(new Uri(@"Resource/Cursor/FillBackground_32x32_1.cur", UriKind.Relative)).Stream);
        public Cursor mColorCursor = new Cursor(System.Windows.Application.GetResourceStream(new Uri(@"Resource/Cursor/Color_Dropper_2.cur", UriKind.Relative)).Stream);

        public InkCanvasEditingMode Mode { get; set; }
        public Cursor Cursor { get; set; }
        public Size PenSize { get; set; }
        public bool IsBackground { get; set; }
        public Color ForegroundColor { get; set; }
        public Color BackgroundColor { get; set; }
        public PixelFormat PixelFormat { get; set; }

        private PaintSettings()
        {
            Mode = InkCanvasEditingMode.Ink;
            PenSize = new Size(1, 1);
            Cursor = mPenCursor;
            IsBackground = false;
        }
        public static PaintSettings inst()
        {
            if (_inst == null)
                _inst = new PaintSettings();
            return _inst;
        }
    }
}
